<?php 
$master = array(
            array('key'=>0, 'value'=>'No'),
            array('key'=>1, 'value'=>'Yes'));
echo '<pre>';
//print_r($this->permissions);
echo '</pre>';
?>
<form action="index.php?option=com_permission" method="post" name="adminForm" id="adminForm">
<div class="width-100">
	<?php echo  JHtml::_('sliders.start', 'permissions-sliders', $params = array(startOffset=>-1, useCookie=>false)); 
        foreach ($this->func as $f): 
            echo JHtml::_('sliders.panel', $f->FUNC_NAME, 'publishing-details');
    		echo '<fieldset class="panelform">';
    			echo '<table class="group-rules">';
                    echo '<thead>';
                        echo '<tr><th width="200px">ユーザタイプ</th>';
                        echo '<th width="80px">追加</th>';
                        echo '<th width="80px">編集</th>';
                        echo '<th width="80px">削除</th>';
                        echo '<th width="80px">自編集</th></tr>';
                    echo '</thead>';
                    echo '<tbody>';
                    foreach($this->groups as $group) :

                        $default = $this->permissions[$f->FUNC_CODE][$group->id];

                        echo '<tr>';
                        echo '<td>'."<label>$group->title</label>".'</td>'; 
                        echo '<td>'.JHTML::_('Select.genericlist',$master,"func[$f->FUNC_CODE][$group->id][PRRM_INSERT]",'','key','value',$default['PRRM_INSERT']).'</td>';
                        echo '<td>'.JHTML::_('Select.genericlist',$master,"func[$f->FUNC_CODE][$group->id][PRRM_UPDATE]",'','key','value',$default['PRRM_UPDATE']).'</td>';
                        echo '<td>'.JHTML::_('Select.genericlist',$master,"func[$f->FUNC_CODE][$group->id][PRRM_DELETE]",'','key','value',$default['PRRM_DELETE']).'</td>';
                        echo '<td>'.JHTML::_('Select.genericlist',$master,"func[$f->FUNC_CODE][$group->id][PRRM_EDITOWN]",'','key','value',$default['PRRM_EDITOWN']).'</td>';
                        echo '</tr>';
                    endforeach;
                    echo '</tbody>';
    			echo '</table>';
    		echo '</fieldset>';
        endforeach ?>

	<?php echo JHtml::_('sliders.end'); ?>
</div>

<input type="hidden" name="task" value=""/>
</form>
<script>
jq(document).ready(function(){
    alert('ユーザロールの設定変更は設定状況を確認後に行って下さい');
});
</script>